<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class admin_login extends CI_Controller {
	
	protected $_page_name = "admin_login";
	protected $_page_id = 'ul_postcontainer';
	protected $data;

	function index() {
		//khởi tạo data, session
		$this->_initdata();
		
		//thông báo msg
		$data['msg'] = $this->Adminmodel->_get_session("msg");
		$this->Adminmodel->_set_session("msg","");
		
		//show template
		$data['base_url']=$this->config->item('base_url');
		$data['img_url']=$this->config->item('img_url');
		$data['base_page'] = DEFAULT_PAGE;
		$data['website_name'] = WEBSITE_NAME;
		$data['sCur_Page'] = "admin_login";
		$this->load->view('admin_login',$data);
	}	

	function _initdata()
	{
		session_start();
		$this->load->model('Adminmodel');
	}
}
